<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./js/vue.js"></script>
    <div class="box">
        <ul>
            <!-- v-for 可以遍历数组 （数组中的每一项，下标）in或者使用of 数组名 -->
            <li v-for="(item,index) in list" :key="index">{{index}}------{{item.id}}</li>
        </ul>
    </div>
    <script>
        // v-for可以用来进行遍历 数组和对象进行遍历
        let vm=new Vue({
            el:'.box',
            data:{
                list:[{id:'01',name:'你好'},{id:'02',name:'我好'},{id:'03',name:'好好'}]
            }
        })
    </script>
</body>
</html>